package com.hsylient.javase.chapter10;

import org.junit.Test;

import java.util.regex.Pattern;

public class CheckRegex {

    @Test
    public void testRegex() {
        boolean matches = Pattern.matches("^\\\\-?((([1-9]{1}\\\\d*)|([0]{1})))(\\\\.(\\\\d){0,9})?$", "1.2");
        System.out.println(matches);
    }
}
